﻿using Newtonsoft.Json.Serialization;

namespace DongFangGuoKai.WMSPlatform.Commn.HttpModule.JsonFormat.NewtonSoft
{
    /// <summary>
    /// 扩展ContractResolver
    /// </summary>
    public class ToLowerPropertyNamesContractResolver : DefaultContractResolver
    {
        public ToLowerPropertyNamesContractResolver()
        {
            NamingStrategy = new LowerStrategyToLower();
        }
    }

    /// <summary>
    /// Json序列化策略-ToLower
    /// </summary>
    public class LowerStrategyToLower : NamingStrategy
    {
        protected override string ResolvePropertyName(string name)
        {

            return name.ToLower();
        }
    }


}
